
***** Figure A1 -- Comparison of Control Policy Views in Kenya and Uganda
keep if ref_control == 1 // keep control group only
keep hhid village_id county_name e_rf1 - e_rf6

append using "$path/Data/working.dta", gen(uganda) keep(ent_id treatment e2_j1 e2_j2 e2_j3 e2_j4 e2_j5 e2_j6)
drop if uganda == 1 & treatment != 6 // keep control only
drop if uganda == 1 & e2_j1 == . // drop unsurveyed
drop treatment

forvalues i=1/6{
replace e_rf`i' = e2_j`i' if uganda == 1
}
drop e2_j*

forvalues i=1/6{
replace e_rf`i' = 3 if e_rf`i' == 6 // assign "it depends on nationality" to "neutral"
gen e_rf_flip`i' =  6 - e_rf`i' // reorder so high values correspond to support
}

distplot e_rf_flip1, over(uganda) xlabel(1 `" "Strongly" "Disagree" "' 2 `" "Somewhat" "Disagree" "' 3 "Neutral" 4 `" "Somewhat" "Agree" "' 5 `" "Strongly" "Agree" "') ytitle("Cumulative Share") graphregion(color(white)) xtitle("") recast(bar) color(gs12 gs2%80) lcolor(black) lwidth(medthin) legend(order(1 "Kenya" 2 "Uganda") rows(1) position(6)) title("Supports Refugee Hosting") nodraw yline(0, lp(solid) lw(thick))
graph save "$path/Output/FigA1_1.gph", replace

distplot e_rf_flip6, over(uganda) xlabel(1 `" "Strongly" "Disagree" "' 2 `" "Somewhat" "Disagree" "' 3 "Neutral" 4 `" "Somewhat" "Agree" "' 5 `" "Strongly" "Agree" "') ytitle("") graphregion(color(white)) xtitle("") recast(bar) color(gs12 gs2%80) lcolor(black) lwidth(medthin) legend(order(1 "Kenya" 2 "Uganda") rows(1) position(6)) title("Supports More Refugees") nodraw yline(0, lp(solid) lw(thick))
graph save "$path/Output/FigA1_6.gph", replace

distplot e_rf_flip3, over(uganda) xlabel(1 `" "Strongly" "Disagree" "' 2 `" "Somewhat" "Disagree" "' 3 "Neutral" 4 `" "Somewhat" "Agree" "' 5 `" "Strongly" "Agree" "') ytitle("Cumulative Share") graphregion(color(white)) xtitle("") recast(bar) color(gs12 gs2%80) lcolor(black) lwidth(medthin) legend(order(1 "Kenya" 2 "Uganda") rows(1) position(6)) title("Supports Right to Work") nodraw yline(0, lp(solid) lw(thick))
graph save "$path/Output/FigA1_3.gph", replace

distplot e_rf_flip2, over(uganda) xlabel(1 `" "Strongly" "Disagree" "' 2 `" "Somewhat" "Disagree" "' 3 "Neutral" 4 `" "Somewhat" "Agree" "' 5 `" "Strongly" "Agree" "') ytitle("") graphregion(color(white)) xtitle("") recast(bar) color(gs12 gs2%80) lcolor(black) lwidth(medthin) legend(order(1 "Kenya" 2 "Uganda") rows(1) position(6)) title("Supports Free Movement") nodraw yline(0, lp(solid) lw(thick))
graph save "$path/Output/FigA1_2.gph", replace

distplot e_rf_flip4, over(uganda) xlabel(1 `" "Strongly" "Disagree" "' 2 `" "Somewhat" "Disagree" "' 3 "Neutral" 4 `" "Somewhat" "Agree" "' 5 `" "Strongly" "Agree" "') ytitle("Cumulative Share") graphregion(color(white)) xtitle("") recast(bar) color(gs12 gs2%80) lcolor(black) lwidth(medthin) legend(order(1 "Kenya" 2 "Uganda") rows(1) position(6)) title("Supports Providing Land") nodraw yline(0, lp(solid) lw(thick))
graph save "$path/Output/FigA1_4.gph", replace

distplot e_rf_flip5, over(uganda) xlabel(1 `" "Strongly" "Disagree" "' 2 `" "Somewhat" "Disagree" "' 3 "Neutral" 4 `" "Somewhat" "Agree" "' 5 `" "Strongly" "Agree" "') ytitle("") graphregion(color(white)) xtitle("") recast(bar) color(gs12 gs2%80) lcolor(black) lwidth(medthin) legend(order(1 "Kenya" 2 "Uganda") rows(1) position(6)) title("Supports Citizenship")   yline(0, lp(solid) lw(thick)) nodraw
graph save "$path/Output/FigA1_5.gph", replace

grc1leg2 "$path/Output/FigA1_1.gph" "$path/Output/FigA1_6.gph" "$path/Output/FigA1_3.gph" "$path/Output/FigA1_2.gph" "$path/Output/FigA1_4.gph" "$path/Output/FigA1_5.gph", legendfrom("$path/Output/FigA1_1.gph") rows(3) iscale(0.5) legscale(medium) ysize(*1.5)

graph export "$path/Output/Appendix_A/ken_ug_comparison.eps", replace

erase "$path/Output/FigA1_1.gph"
erase "$path/Output/FigA1_2.gph"
erase "$path/Output/FigA1_3.gph"
erase "$path/Output/FigA1_4.gph"
erase "$path/Output/FigA1_5.gph"
erase "$path/Output/FigA1_6.gph"
